package com.free.mini.study.controller;

import com.free.mini.core.server.api.UserControllerApi;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.free.mini.common.base.ResultData;
import com.free.mini.core.server.vo.req.UserQueryTokenReqVO;
import com.free.mini.core.server.vo.resp.UserQueryTokenRespVO;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author dongsufeng
 * @version 4.0
 * @date 2023/8/12 10:20
 */
@RestController
@RequestMapping("api/study/v1/user/")
@Slf4j
@RequiredArgsConstructor
public class UserController {

    private final UserControllerApi userControllerApi;

    @PostMapping("query/token")
    public ResultData<UserQueryTokenRespVO> getToken(@RequestBody @Validated UserQueryTokenReqVO reqVO){
        return userControllerApi.getToken(reqVO);
    }
}
